#include "CommandProcessor.h"


#ifndef NULL
#define NULL 0
#endif

CommandProcessor::CommandProcessor()
{
	commands = Queue<Command*>();
}

void CommandProcessor::addCommand(Command* c)
{
	commands.push(c);
	c->execute();	
}

Command* CommandProcessor::popCommand()
{
	if(commands.empty() != 1)
		return commands.pop();
	else
		return NULL;
}
